using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cmc.Modbus.Base
{
    public static class FunctionCode
    {
        /// <summary>
        ///0x01	读线圈
        /// </summary>
        public const byte ReadCS = 0x01;

        /// <summary>
        /// 0x02	读离散量输入
        /// </summary>
        public const byte ReadIS = 0x02;

        /// <summary>
        /// 0x03	读保持寄存器
        /// </summary>
        public const byte ReadHR = 0x03;

        /// <summary>
        /// 0x04	读输入寄存器
        /// </summary>
        public const byte ReadIR = 0x04;

        /// <summary>
        /// 0x05	写单个线圈
        /// </summary>
        public const byte WriteCS = 0x05;

        /// <summary>
        /// 0x06	写单个保持寄存器
        /// </summary>
        public const byte WriteHR = 0x06;

        /// <summary>
        ///  0x0F	写多个线圈
        /// </summary>
        public const byte WriteCSs = 0x0F;

        /// <summary>
        /// 0x10	写多个保持寄存器
        /// </summary>
        public const byte WriteHRs = 0x10;
    }
}
